﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Dimok.Web.UI;

public partial class Manager_Admin_ContractHolders : System.Web.UI.Page {
	protected void Page_Load(object sender, EventArgs e) {
		Title = "Contract Holders";
		ContractHolder.RowSelected += new GridViewExEventHandler(ContractHolder_RowSelected);
	}

	protected void ContractConditions_RowSelected(object sender, GridViewExEventArgs e) {
		GridViewEx grv = (GridViewEx)sender;
		string code = e.RowIndex < 0 ? "" : e.Key["Code"]+"";
		ContractHolder.SelectedIndex = -1;
		if (code != "") dsContractHolder.ConditionsCode = code;
		else dsContractHolder.ContractHolderID = -1;
		//((Data.DataSources.ContractConditionCodeDataSource)Find.ControlByID(this, "dsContractCondition")).ContractConditionCode = code;
	}

	void ContractHolder_RowSelected(object sender, GridViewExEventArgs e) {
		GridViewEx grv = (GridViewEx)sender;
		int id = e.RowIndex < 0 ? -1 : (int)e.Key["ID"];
		dsContractHolder.ContractHolderID = id;
	}
}
